From 270e493bdcdb07f88c92356d27280f9b3ea71966 Mon Sep 17 00:00:00 2001 From: Andreas Beckmann Date: Wed, 27 Jan 2021 21:26:51 +0100 Subject: [PATCH] [PATCH] restore setting unroll-threshold on LLVM 9 otherwise kernel/test_rotate hangs on avx512 capable cpus (this partially reverts 459d0bb5241a62af3b5b607a65dcf5e9a34a01ee) Gbp-Pq: Name 2003-restore-setting-unroll-threshold-on-LLVM-9.patch --- lib/CL/pocl_llvm_utils.cc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/CL/pocl_llvm_utils.cc b/lib/CL/pocl_llvm_utils.cc index b48cc78..d1f3aec 100644 --- a/lib/CL/pocl_llvm_utils.cc +++ b/lib/CL/pocl_llvm_utils.cc @@ -362,6 +362,12 @@ void InitializeLLVM() { O->addOccurrence(1, StringRef("debug"), StringRef("true"), false); } +#if LLVM_MAJOR == 9 + O = opts["unroll-threshold"]; + assert(O && "could not find LLVM option 'unroll-threshold'"); + O->addOccurrence(1, StringRef("unroll-threshold"), StringRef("1"), false); +#endif + LLVMInitialized = true; } -- 2.30.2